🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / map / src / commonMain / kotlin / org / meshtastic / feature / map / component / MapZoomControls.kt
Displaying Raw • Download
feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/MapZoomControls.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 2.70 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tf0883e@fileTb4b4b4:Te6edf3OptInTb4b4b4(Te6edf3ExperimentalMaterial3ExpressiveApiTff7b72::Te6edf3classTb4b4b4)
Tff7b72package T7ee787org.meshtastic.feature.map.component
Tff7b72import T7ee787androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
Tff7b72import T7ee787androidx.compose.material3.FloatingToolbarDefaults
Tff7b72import T7ee787androidx.compose.material3.VerticalFloatingToolbar
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.zoom_in
Tff7b72import T7ee787org.meshtastic.core.resources.zoom_out
Tff7b72import T7ee787org.meshtastic.core.ui.icon.Add
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
Tff7b72import T7ee787org.meshtastic.core.ui.icon.Remove
T8b949e/**
* Zoom in and out, stacked, for the corner of a map.
*
* Where Google Maps puts its own: `MapUiSettings(zoomControlsEnabled = true)` draws a vertical pair against the lower
* trailing edge, clear of the top of the map, and every Google-flavor map surface in this app turns it on. MapLibre
* publishes no zoom ornament at all, so its maps draw this instead — placed the same way, so the two flavors feel alike
* and the reachable half of a phone screen is where the frequent control lives.
*
* Separate from [MapControlsOverlay] on purpose. That toolbar holds the occasional controls — filter, basemap, layers —
* and belongs at the top; zoom belongs where the thumb is.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffMapZoomControlsTb4b4b4(Te6edf3onZoomInTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3onZoomOutTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4) Tb4b4b4{
Te6edf3VerticalFloatingToolbarTb4b4b4(
Te6edf3expanded Tff7b72= Tff7b72trueTb4b4b4,
Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4,
Te6edf3colors Tff7b72= Te6edf3FloatingToolbarDefaultsTb4b4b4.Te6edf3standardFloatingToolbarColorsTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3MapButtonTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3AddTb4b4b4,
Te6edf3contentDescription Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3zoom_inTb4b4b4)Tb4b4b4,
Te6edf3onClick Tff7b72= Te6edf3onZoomInTb4b4b4,
Tb4b4b4)
Te6edf3MapButtonTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3RemoveTb4b4b4,
Te6edf3contentDescription Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3zoom_outTb4b4b4)Tb4b4b4,
Te6edf3onClick Tff7b72= Te6edf3onZoomOutTb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.2 - Generated in 0.21s